package net.wofly.sale.order.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.wofly.sale.order.repository.DistributionInfoRepository;
import net.wofly.sale.order.domain.DistributionInfo;
import net.wofly.sale.order.service.IDistributionInfoService;

@Service("iDistributionInfoService")
@Transactional
public class DistributionInfoServiceImpl implements IDistributionInfoService {

	@Autowired
	DistributionInfoRepository distributionInfoRepository;

	@Override
	public DistributionInfo save(DistributionInfo entity) {
		return distributionInfoRepository.save(entity);
	}

	@Override
	public void delete(DistributionInfo entity) {
		distributionInfoRepository.delete(entity);
	}

	@Override
	public void delete(String key) {
		distributionInfoRepository.delete(key);
	}

	@Override
	public DistributionInfo findOne(String key) {
		return distributionInfoRepository.findOne(key);
	}

	@Override
	public List<DistributionInfo> save(List<DistributionInfo> entityList) {
		return (List<DistributionInfo>) distributionInfoRepository.save(entityList);
	}
}
